package com.ubxtech.web.locale;

import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.PackageVersion;
import com.ubxtech.web.properties.AuthProperties;

import java.util.Date;

/**
 * @author Victor.Xiao
 * @since 2023-09-15 11:42
 **/
public class CustomLocaleDateModule extends SimpleModule {

    public CustomLocaleDateModule(AuthProperties authProperties) {
        super(PackageVersion.VERSION);
        this.addSerializer(Date.class,new CustomLocaleDateSerializer(authProperties));
        this.addDeserializer(Date.class,new CustomLocaleDateDeserializer(authProperties));
    }
}
